/**
 * Created by Francis.LW on 2017/10/20.
 *
 * 注册用户服务接口
 */
import {postRequest, getRequest} from '@/common/request'
import {urls} from './url'

const signUserApi = urls.signUser


function list(param, page, pageSize, success, complete) {
  postRequest(signUserApi.list + '?currentpage=' + page + '&pagesize=' + pageSize, {}, param, success, complete)
}

function get(id, success, complete) {
  getRequest(signUserApi.get + id, {}, success, complete)
}

function remove(ids, success, complete) {
  postRequest(signUserApi.remove, {}, ids, success, complete)
}

function freezeSignUser(status, id, success, complete) {
  let ids = []
  ids.push(id)
  postRequest(signUserApi.freezeSignUser + status, {}, ids, success, complete)
}

/**
 *
 * @param ids
 * @param success
 * @param complete
 */
function deleteSingleSignUser(id, success, complete) {
  let ids = []
  ids.push(id)
  remove(ids, success, complete)
}


export default {
  list,
  get,
  remove,
  deleteSingleSignUser,
  freezeSignUser
}
